package com.wondedDream.service;

import com.wondedDream.model.MockExam;
import com.wondedDream.model.UserMockExamRecord;
import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

@Service
public interface MockExamService {
    MockExam saveMockExam(MockExam exam);
    MockExam getMockExamById(Integer id);
    MockExam updateMockExam(MockExam mockExam);
    void deleteMockExam(Integer id);
    // 新增的统计方法
    List<UserMockExamRecord> getMockExamStatistics();
    List<UserMockExamRecord> getMockExamStatisticsByTimeRange(String timeRange);


    void startMockExam(Integer userId, Integer mockExamId);
    void recordMockExamAnswer(Integer mockExamId, String userOpenId);
    void submitMockExam(UserMockExamRecord userMockExamRecord);

    List<MockExam> getMockExamsByCategoryId(Integer categoryId);

    List<MockExam> getMockExamsByCategoryIdAndOpenId(Integer categoryId, String userOpenId);
}
